The present technique relates to an apparatus and method for handling maintenance operations for an address translation cache.
It is known to provide data processing systems which incorporate an address translation cache, such as a translation lookaside buffer (TLB), to store address translation data relating to the translation of virtual addresses to physical addresses. The provision of an address translation cache is useful in improving performance by reducing the number of slow page table walks to memory required in order to obtain the required address translation data.
It is also known to provide the address translation cache as a set associative structure. When a new item of address translation data is to be allocated into a set associative address translation cache, a number of bits of an associated virtual address can be used to form an index to identify a particular set within the address translation cache, with the address translation data then being stored within one of the entries of that set.
The address translation cache will typically be associated with a processor that references the address translation cache in order to translate virtual addresses into physical addresses, and that processor may be arranged to operate in multiple different contexts. For example, different contexts may be associated with different processes executed by the processor and/or with different exception levels that the processor is operating at. The address translation cache may hold address translation data for multiple different contexts, and each entry may have an associated context identifier to identify the context to which the address translation data stored therein applies. Maintenance operations may need to performed within the address translation cache, and in some instances a maintenance request may target all entries within the address translation cache that store address translation data for a specified context. Within a set associative address translation cache, it can take a significant amount of time to process such a maintenance request. For example, in the worst case where each set contains at least one entry that does store address translation data for the specified context, the number of cycles taken to process the maintenance operations required to implement the maintenance request may be twice the number of sets in the address translation cache (where for each set there is a requirement to perform a read in one cycle, and then a write in a subsequent cycle in order to implement the maintenance operation (for example by invalidating the relevant entry)).
Often, a request source that issues such a maintenance request will implement a barrier operation such that it will only continue its operation once it receives a response identifying that the required maintenance operations have been performed, and accordingly the time taken to process a maintenance request that targets an entire context can have a significant performance impact on the processing performed by the request source. Accordingly, it would be desirable to provide an improved mechanism for handling such maintenance operations for an address translation cache.